/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "monitoring")
@NamedQueries({
    @NamedQuery(name = "Monitoring.findAll", query = "SELECT m FROM Monitoring m"),
    @NamedQuery(name = "Monitoring.findByInstallationdate", query = "SELECT m FROM Monitoring m WHERE m.installationdate = :installationdate"),
    @NamedQuery(name = "Monitoring.findByInstallationtime", query = "SELECT m FROM Monitoring m WHERE m.installationtime = :installationtime"),
    @NamedQuery(name = "Monitoring.findByCollectdate", query = "SELECT m FROM Monitoring m WHERE m.collectdate = :collectdate"),
    @NamedQuery(name = "Monitoring.findByCollecttime", query = "SELECT m FROM Monitoring m WHERE m.collecttime = :collecttime"),
    @NamedQuery(name = "Monitoring.findByPlotnumber", query = "SELECT m FROM Monitoring m WHERE m.plotnumber = :plotnumber"),
    @NamedQuery(name = "Monitoring.findByAmostralnumber", query = "SELECT m FROM Monitoring m WHERE m.amostralnumber = :amostralnumber"),
    @NamedQuery(name = "Monitoring.findByFloorheight", query = "SELECT m FROM Monitoring m WHERE m.floorheight = :floorheight"),
    @NamedQuery(name = "Monitoring.findByWeight", query = "SELECT m FROM Monitoring m WHERE m.weight = :weight"),
    @NamedQuery(name = "Monitoring.findByWidth", query = "SELECT m FROM Monitoring m WHERE m.width = :width"),
    @NamedQuery(name = "Monitoring.findByLength", query = "SELECT m FROM Monitoring m WHERE m.length = :length"),
    @NamedQuery(name = "Monitoring.findByHeight", query = "SELECT m FROM Monitoring m WHERE m.height = :height"),
    @NamedQuery(name = "Monitoring.findByIdmonitoring", query = "SELECT m FROM Monitoring m WHERE m.idmonitoring = :idmonitoring")})
public class Monitoring implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "installationdate")
    @Temporal(TemporalType.DATE)
    private Date installationdate;
    @Column(name = "installationtime")
    @Temporal(TemporalType.TIME)
    private Date installationtime;
    @Column(name = "collectdate")
    @Temporal(TemporalType.DATE)
    private Date collectdate;
    @Column(name = "collecttime")
    @Temporal(TemporalType.TIME)
    private Date collecttime;
    @Column(name = "plotnumber")
    private Integer plotnumber;
    @Column(name = "amostralnumber")
    private Integer amostralnumber;
    @Column(name = "floorheight")
    private BigInteger floorheight;
    @Column(name = "weight")
    private BigInteger weight;
    @Column(name = "width")
    private BigInteger width;
    @Column(name = "length")
    private BigInteger length;
    @Column(name = "height")
    private BigInteger height;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idmonitoring")
    private Integer idmonitoring;
    @OneToMany(mappedBy = "monitoring", fetch = FetchType.LAZY)
    private List<Specimen> specimenList;
    @JoinColumn(name = "idtechnicalcollection", referencedColumnName = "idtechnicalcollection")
    @ManyToOne(fetch = FetchType.LAZY)
    private Technicalcollection technicalcollection;
    @JoinColumn(name = "idsurroundingsculture", referencedColumnName = "idsurroundingsculture")
    @ManyToOne(fetch = FetchType.LAZY)
    private Surroundingsculture surroundingsculture;
    @JoinColumn(name = "idsupporttype", referencedColumnName = "idsupporttype")
    @ManyToOne(fetch = FetchType.LAZY)
    private Supporttype supporttype;
    @JoinColumn(name = "idpredominantbiome", referencedColumnName = "idpredominantbiome")
    @ManyToOne(fetch = FetchType.LAZY)
    private Predominantbiome predominantbiome;
    @JoinColumn(name = "iddigitizer", referencedColumnName = "iddigitizer")
    @ManyToOne(fetch = FetchType.LAZY)
    private Digitizer digitizer;
    @JoinColumn(name = "iddenomination", referencedColumnName = "iddenomination")
    @ManyToOne(fetch = FetchType.LAZY)
    private Denomination denomination;
    @JoinColumn(name = "idculture", referencedColumnName = "idculture")
    @ManyToOne(fetch = FetchType.LAZY)
    private Culture culture;
    @JoinColumn(name = "idcultivar", referencedColumnName = "idcultivar")
    @ManyToOne(fetch = FetchType.LAZY)
    private Cultivar cultivar;
    @JoinColumn(name = "idcolorpantrap", referencedColumnName = "idcolorpantrap")
    @ManyToOne(fetch = FetchType.LAZY)
    private Colorpantrap colorpantrap;
    @JoinColumn(name = "idcollector", referencedColumnName = "idcollector")
    @ManyToOne(fetch = FetchType.LAZY)
    private Collector collector;

    public Monitoring() {
    }

    public Monitoring(Integer idmonitoring) {
        this.idmonitoring = idmonitoring;
    }

    public Date getInstallationdate() {
        return installationdate;
    }

    public void setInstallationdate(Date installationdate) {
        this.installationdate = installationdate;
    }

    public Date getInstallationtime() {
        return installationtime;
    }

    public void setInstallationtime(Date installationtime) {
        this.installationtime = installationtime;
    }

    public Date getCollectdate() {
        return collectdate;
    }

    public void setCollectdate(Date collectdate) {
        this.collectdate = collectdate;
    }

    public Date getCollecttime() {
        return collecttime;
    }

    public void setCollecttime(Date collecttime) {
        this.collecttime = collecttime;
    }

    public Integer getPlotnumber() {
        return plotnumber;
    }

    public void setPlotnumber(Integer plotnumber) {
        this.plotnumber = plotnumber;
    }

    public Integer getAmostralnumber() {
        return amostralnumber;
    }

    public void setAmostralnumber(Integer amostralnumber) {
        this.amostralnumber = amostralnumber;
    }

    public BigInteger getFloorheight() {
        return floorheight;
    }

    public void setFloorheight(BigInteger floorheight) {
        this.floorheight = floorheight;
    }

    public BigInteger getWeight() {
        return weight;
    }

    public void setWeight(BigInteger weight) {
        this.weight = weight;
    }

    public BigInteger getWidth() {
        return width;
    }

    public void setWidth(BigInteger width) {
        this.width = width;
    }

    public BigInteger getLength() {
        return length;
    }

    public void setLength(BigInteger length) {
        this.length = length;
    }

    public BigInteger getHeight() {
        return height;
    }

    public void setHeight(BigInteger height) {
        this.height = height;
    }

    public Integer getIdmonitoring() {
        return idmonitoring;
    }

    public void setIdmonitoring(Integer idmonitoring) {
        this.idmonitoring = idmonitoring;
    }

    public List<Specimen> getSpecimenList() {
        return specimenList;
    }

    public void setSpecimenList(List<Specimen> specimenList) {
        this.specimenList = specimenList;
    }

    public Technicalcollection getTechnicalcollection() {
        return technicalcollection;
    }

    public void setTechnicalcollection(Technicalcollection technicalcollection) {
        this.technicalcollection = technicalcollection;
    }

    public Surroundingsculture getSurroundingsculture() {
        return surroundingsculture;
    }

    public void setSurroundingsculture(Surroundingsculture surroundingsculture) {
        this.surroundingsculture = surroundingsculture;
    }

    public Supporttype getSupporttype() {
        return supporttype;
    }

    public void setSupporttype(Supporttype supporttype) {
        this.supporttype = supporttype;
    }

    public Predominantbiome getPredominantbiome() {
        return predominantbiome;
    }

    public void setPredominantbiome(Predominantbiome predominantbiome) {
        this.predominantbiome = predominantbiome;
    }

    public Digitizer getDigitizer() {
        return digitizer;
    }

    public void setDigitizer(Digitizer digitizer) {
        this.digitizer = digitizer;
    }

    public Denomination getDenomination() {
        return denomination;
    }

    public void setDenomination(Denomination denomination) {
        this.denomination = denomination;
    }

    public Culture getCulture() {
        return culture;
    }

    public void setCulture(Culture culture) {
        this.culture = culture;
    }

    public Cultivar getCultivar() {
        return cultivar;
    }

    public void setCultivar(Cultivar cultivar) {
        this.cultivar = cultivar;
    }

    public Colorpantrap getColorpantrap() {
        return colorpantrap;
    }

    public void setColorpantrap(Colorpantrap colorpantrap) {
        this.colorpantrap = colorpantrap;
    }

    public Collector getCollector() {
        return collector;
    }

    public void setCollector(Collector collector) {
        this.collector = collector;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idmonitoring != null ? idmonitoring.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Monitoring)) {
            return false;
        }
        Monitoring other = (Monitoring) object;
        if ((this.idmonitoring == null && other.idmonitoring != null) || (this.idmonitoring != null && !this.idmonitoring.equals(other.idmonitoring))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Monitoring[idmonitoring=" + idmonitoring + "]";
    }

}
